@model OrchardCore.ContentTypes.GraphQL.ViewModels.GraphQLContentTypePartSettingsViewModel

@{
    var options = Model.Options;
    var settings = Model.Settings;

    var collapsedByDefault = options.IsCollapsedByDefault(Model.Definition);
    var collapsed = collapsedByDefault ? true : settings.Collapse;
    
    var hiddenByDefault = options.IsHiddenByDefault(Model.Definition);
    var hidden = hiddenByDefault ? true : settings.Hidden;
}

<div class="form-group">
    <div class="custom-control custom-checkbox">
        <input type="checkbox" class="custom-control-input" asp-for="Settings.Collapse" checked="@collapsed" asp-is-disabled="@collapsedByDefault" />
        <label class="custom-control-label" asp-for="Settings.Collapse">@T["Collapse"]</label>
        @if (collapsedByDefault)
        {
            <span class="hint">@T["NB. Setting is collapsed by default, and cannot be overwritten."]</span>
        }
        else
        {
            <span class="hint">@T["Check to collapse fields in the GraphQL schema."]</span>
        }
    </div>
    <div class="custom-control custom-checkbox">
        <input type="checkbox" class="custom-control-input" asp-for="Settings.Hidden" checked="@hidden" asp-is-disabled="@hiddenByDefault" />
        <label class="custom-control-label" asp-for="Settings.Hidden">@T["Hide"]</label>
        @if (hiddenByDefault)
        {
            <span class="hint">@T["NB. Setting is collapsed by default, and cannot be overwritten."]</span>
        }
        else
        {
            <span class="hint">@T["Check to hide type from the GraphQL schema."]</span>
        }
    </div>
</div>